app-chooser-dialog: make sure to hold a ref when doing async ops
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 1 Feb 2012 18:16:06 +0000 (13:16 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 1 Feb 2012 18:21:43 +0000 (13:21 -0500)
commit623b5192cc5d466cee5ed5e9bbb7f343df7dbba8
tree6c8611635e933e2478512af3403f40e0d77e7487
parentc0ee68b7fe48a989bb02a06cc94fc13bddb39de3
app-chooser-dialog: make sure to hold a ref when doing async ops

Hold a ref to the GtkDialog while doing async operations with the
GtkAppChooserOnline object.
This is needed, since somebody could call gtk_widget_destroy() on us
while an async operation is in progress. We don't want to be finalized
in that case, but mark the fact that we were dismissed and just return
from the callback in that case.
This avoids crashing if the dialog is destroyed in the middle of a PK
operation.

https://bugzilla.gnome.org/show_bug.cgi?id=649121
gtk/gtkappchooserdialog.c